﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ProjectStudy.CSharp高级编程;

namespace ProjectStudy.CSharp高级教程
{
    public partial class 练习 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            { 
              //泛型
                List<int> list_int = new List<int>();
                list_int.Add(1);
                list_int.Add(2);

                List<string> list_string = new List<string>();
                list_string.Add("张三");

                List<Person> list_person = new List<Person>();
                Person p1 = new Person();
                p1.Name = "张三";
                p1.Sex = "男";
                p1.Age = 21;
                list_person.Add(p1);
                TextBox1.Text= list_person[0].Play();


            }
        }
    }
}